﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace backend.Models;

public partial class Failure
{
    [Key]
    [Column("F_ID")]
    [StringLength(8)]
    [Unicode(false)]
    public string FId { get; set; } = null!;

    [Column("P_ID")]
    [StringLength(8)]
    [Unicode(false)]
    public string PId { get; set; } = null!;

    [Column("F_Name")]
    [StringLength(16)]
    public string FName { get; set; } = null!;

    [Column("F_StopUsing")]
    public bool FStopUsing { get; set; }

    [InverseProperty("FIdNavigation")]
    public virtual ICollection<FailureDatum> FailureData { get; set; } = new List<FailureDatum>();

    [ForeignKey("PId")]
    [InverseProperty("Failures")]
    public virtual Profession PIdNavigation { get; set; } = null!;

    [InverseProperty("FIdNavigation")]
    public virtual ICollection<RepairRequest> RepairRequests { get; set; } = new List<RepairRequest>();
}
